<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/12
 * Time: 16:01
 */

namespace app\index\validate;


use think\Validate;

class Wregister extends Validate
{

    protected $rule = [
        'u_password'       => 'confirm:confirm_password',
        'confirm_password' => 'confirm:u_password',
        'u_email'         => 'require|unique:user|number|length:11',
//        'u_email'          => 'email',
//        'u_email_code'     => 'require',
        'u_code'           => 'require',
    ];

    protected $message = [
        'u_password.confirm'        => '两次输入密码不一致',
        'confirm_password.confirm'  => '两次输入密码不一致',
        'u_email.require'           => '请输入手机号',
        'u_email.unique'            => '手机号已存在',
        'u_email.number'            => '手机号格式错误',
        'u_email.length'            => '手机号长度错误',
//        'u_email.email'             => '邮箱格式错误',
//        'u_email_code.require'      => '请输入邮箱验证码',
        'u_code.require'            => '邀请码不能为空',
    ];
}